package com.gqr.collections.predecessor;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * Copyright (C), 2020-2024,gqr
 * FileName:SynList
 * author:guqingrong
 * Date:2024-05-15 21:28
 * Description:演示Collections.synchronizedList(new ArrayList<E>())
 * History:
 * <author>    <time>    <version>    <desc>
 * 作者姓名     修改时间     版本号        描述
 */
public class SynList {
    public static void main(String[] args) {
        List<Integer> list = Collections.synchronizedList(new ArrayList<Integer>());
        list.add(5);
        System.out.println(list.get(0));
    }
}
